<!DOCTYPE html>
<html>
<head>
    
    <include file="Common/head"/>
    
    <link href="__CSS__/plugins/iCheck/custom.css" rel="stylesheet">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    
    <!-- Panel Other -->
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>配置项编辑</h5>
        </div>
        <div class="ibox-content">
            <div class="row row-lg">
                <div class="col-sm-12">
                    <include file="Common/alert"/>
                    <div class="clearfix" style="width:100%;">
                        <div class="bars pull-left">
                            <div class="btn-group hidden-xs" id="exampleTableEventsToolbar" role="group">
                                <button type="button" class="btn btn-outline btn-default" href="{:U('Config/index')}" style="padding-bottom: 8px;padding-top: 8px;">
                                    <i class="glyphicon glyphicon-chevron-left" aria-hidden="true"></i>
                                </button>
                                <button type="button" class="btn btn-outline btn-default" href="{:U('Config/edit')}" style="padding-bottom: 8px;padding-top: 8px;">
                                    <i class="glyphicon glyphicon-plus" aria-hidden="true"></i>
                                </button>
                                <button class="btn btn-default btn-outline" type="button" name="refresh" title="刷新" href="__SELF__" style="padding-bottom: 8px;padding-top: 8px;">
                                    <i class="glyphicon glyphicon-repeat"></i>
                                </button>
                                <button type="button" class="btn btn-outline btn-default confirm" href="{:U('Config/delete',['id'=>$info['id']])}" style="padding-bottom: 8px;padding-top: 8px;">
                                    <i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
                                </button>
                            </div>
                        </div>
                    </div>
    
                    <form method="post" action="__SELF__" class="form-horizontal">
        
                        <div class="form-group">
                            
                            <div class="hr-line-dashed"></div>
                            
                            <label class="col-sm-2 control-label">状态
                                <!--<br><small class="text-navy">自定义样式</small>-->
                            </label>
            
                            <div class="col-sm-10">
                                <!--<select class="form-control" id="group" name="group">-->
                                <!--<option value="0">无分组</option>-->
                                <!--<volist name=":C('CONFIG_GROUP_LIST')" id="group">-->
                                <!--<option  value="{$i}" <eq name="info.group" value="$i">selected="selected"</eq> >{$group}</option>-->
                                <!--</volist>-->
                                <!--</select>-->
                                <div class="radio i-checks">
                                    <label>
                                        <input type="radio" value="1" name="status" <eq name="info.status" value="1">checked="checked"</eq>> <i></i> 启用</label>
                                </div>
                                <div class="radio i-checks">
                                    <label>
                                        <input type="radio" value="0" name="status" <eq name="info.status" value="0">checked="checked"</eq>> <i></i> 禁用</label>
                                </div>
                            </div>
                        </div>
        
                        <div class="hr-line-dashed"></div>
        
                        <div class="form-group">
                            <label class="col-sm-2 control-label">配置项标识</label>
                            <div class="col-sm-10">
                                <input name="name" type="text" class="form-control" value="{$info.name|default=''}">
                                <span class="help-block m-b-none">用于C方法调用，只能是英文且不能重复</span>
                            </div>
                        </div>
        
                        <div class="hr-line-dashed"></div>
        
                        <div class="form-group">
                            <label class="col-sm-2 control-label">配置项名称</label>
                            <div class="col-sm-10">
                                <input name="title" type="text" class="form-control" value="{$info.title|default=''}">
                                <span class="help-block m-b-none">用于后台显示的标题</span>
                            </div>
                        </div>
        
                        <div class="hr-line-dashed"></div>
        
                        <div class="form-group">
                            <label class="col-sm-2 control-label">排序</label>
                            <div class="col-sm-4">
                                <input name="sort" type="text" class="form-control" value="{$info.sort|default=''}">
                                <span class="help-block m-b-none">用于分组显示的排序</span>
                            </div>
                        </div>
    
                        <div class="hr-line-dashed"></div>
    
                        <div class="form-group">
                            <label class="col-sm-2 control-label">配置类型</label>
                            <div class="col-sm-10">
                                <select class="form-control" id="type" name="type">
                                    <volist name=":C('CONFIG_TYPE_LIST')" id="type">
                                        <option  value="{$key}" <eq name="info.type" value="$key">selected="selected"</eq> >{$type}</option>
                                    </volist>
                                </select>
                                <span class="help-block m-b-none">系统会根据不同类型解析配置值</span>
                            </div>
                        </div>
    
                        <div class="hr-line-dashed"></div>
        
                        <div class="form-group">
                            <label class="col-sm-2 control-label">分组</label>
                            <div class="col-sm-10">
                                <select class="form-control" id="group" name="group">
                                    <option value="0">无分组</option>
                                    <volist name=":C('CONFIG_GROUP_LIST')" id="group">
                                        <option  value="{$i}" <eq name="info.group" value="$i">selected="selected"</eq> >{$group}</option>
                                    </volist>
                                </select>
                                <span class="help-block m-b-none">配置分组，用于显示在目标配置页，不分组则不显示</span>
                            </div>
                        </div>
        
                        <div class="hr-line-dashed"></div>
        
                        <div class="form-group">
                            <label class="col-sm-2 control-label">配置值</label>
                            <div class="col-sm-10">
                                <textarea name="value" class="form-control" rows="4">{$info.value|default=''}</textarea>
                                <span class="help-block m-b-none">配置值</span>
                            </div>
                        </div>
        
                        <div class="hr-line-dashed"></div>
        
                        <div class="form-group">
                            <label class="col-sm-2 control-label">配置项</label>
                            <div class="col-sm-10">
                                <textarea name="extra" class="form-control" rows="4">{$info.extra|default=''}</textarea>
                                <span class="help-block m-b-none">如果是枚举型，需要配置该项</span>
                            </div>
                        </div>
        
                        <div class="hr-line-dashed"></div>
        
                        <div class="form-group">
                            <label class="col-sm-2 control-label">配置项说明</label>
                            <div class="col-sm-10">
                                <textarea name="remark" class="form-control" rows="4">{$info.remark|default=''}</textarea>
                                <span class="help-block m-b-none">配置详细说明</span>
                            </div>
                        </div>
        
                        <div class="hr-line-dashed"></div>
        
                        <input type="hidden" name="id" value="{$info.id|default=''}"/>
        
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button class="btn btn-primary" type="submit">保存内容</button>
                                <button class="btn btn-white" type="submit" onclick="window.history.go(-1);">取消</button>
                            </div>
                        </div>
                    </form>
                </div>
                
            </div>
        </div>
    </div>
    <!-- End Panel Other -->
</div>
<include file="Common/footer"/>
<script src="__JS__/content.min.js?v=1.0.0"></script>
<script src="__JS__/plugins/iCheck/icheck.min.js"></script>
<script src="__JS__/plugins/summernote/summernote.min.js"></script>
<script src="__JS__/plugins/summernote/summernote-zh-CN.js"></script>

<script>
    $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
    $(document).ready(function(){$(".summernote").summernote({lang:"zh-CN"})});var edit=function(){$("#eg").addClass("no-padding");$(".click2edit").summernote({lang:"zh-CN",focus:true})};var save=function(){$("#eg").removeClass("no-padding");var aHTML=$(".click2edit").code();$(".click2edit").destroy()};
</script>
</body>
</html>
